/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package org.springblade.modules.rate.point.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springblade.modules.rate.point.entity.PointRecord;
import org.springblade.modules.rate.point.excel.PointRecordExcel;
import org.springblade.modules.rate.point.vo.PointRankVO;
import org.springblade.modules.rate.point.vo.PointRecordVO;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import org.springblade.modules.rate.point.vo.PointStatVO;
import org.springblade.modules.rate.point.vo.req.PointRankReqVO;
import org.springblade.modules.rate.point.vo.req.PointStatReqVO;
import org.springblade.modules.system.entity.Dept;

import java.util.List;

/**
 * 积分记录表 服务类
 *
 * @author Blade
 * @since 2021-09-20
 */
public interface IPointRecordService extends BaseService<PointRecord> {

	/**
	 * 自定义分页
	 *
	 * @param page
	 * @param pointRecord
	 * @return
	 */
	IPage<PointRecordVO> selectPointRecordPage(IPage<PointRecordVO> page, PointRecordVO pointRecord);
	/**
	 * 积分统计
	 */
	PointStatVO stat(PointStatReqVO statReqVO);
	/**
	 * 排行榜
	 */
	List<PointRankVO> rank(PointRankReqVO rankVO);
	/**
	 * 我的
	 */
	PointRankVO myRank(PointRankReqVO rankVO);
	/**
	 * 兑换礼物
	 */
	Boolean exchangeGift(PointRecord pointRecord);
	/**
	 * 积分每个月重置
	 */
	Boolean resetMouthQuota();
	/**
	 * 积分当月重置
	 */
	Boolean resetCurrentMouthQuota(Dept dept,Integer deltaQuota);

	/**
	 * 导出
	 */
	List<PointRecordExcel> export(Wrapper<PointRecord> queryWrapper);
}
